Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Create  a  Table  and  Fill  the  First  Column  With  a  Range  of  Dates  

 Content of Create a Table and Fill the First Column With a Range of Dates.vbs
MD5 Hash: 225B6BFC10311AD57F5FA4290CC53EF7
Const NUMBER_OF_ROWS = 1
Const NUMBER_OF_COLUMNS = 2

Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()

Set objRange = objDoc.Range()
objDoc.Tables.Add objRange, NUMBER_OF_ROWS, NUMBER_OF_COLUMNS
Set objTable = objDoc.Tables(1)

objTable.Cell(1, 1).Range.Text = "Date"
objTable.Cell(1, 2).Range.Text = "Notes"

dtmDate = #4/1/2006#
dtmMonth = Month(dtmDate)
i = 2

Do While True
objTable.Rows.Add()
objTable.Cell(i, 1).Range.Text = dtmDate
dtmDate = dtmDate + 1
If Month(dtmDate) <> dtmMonth Then
Exit Do
End If
i = i +1
Loop



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a